# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 18, 2012
@author: blubin
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;
from unique import UNIQUE

class SupervisorApplication(RoleApplication):
    """ The Supervisor User Interface """

    def __init__(self):
        super(SupervisorApplication, self).__init__("RentSubsidy"+UNIQUE, "Supervisor");
        self.register_transition_step("Approve", self.supervisor_approval_form_creator, name_fields=["sequence", "FirstName", "LastName", "EarnedIncome", "CashBenefits"]);

    def supervisor_approval_form_creator(self, stepname, form):
        form.add_task_label(fields=["FirstName", "LastName", "EarnedIncome", "CashBenefits", "RentPayable", "Subsidy"]);
        form.add_field(Type.BOOLEAN, "ApprovalType", labeltext="Approved");
        form.add_field(Type.SHORTSTRING, "DigitalSignature", labeltext="Digital Signature", initial="Signature");
    
if __name__ == '__main__':
    app = SupervisorApplication();
    app.MainLoop();